<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./node_modules/react/umd/react.development.js"></script>
    <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
    <script src="./node_modules/@babel/standalone/babel.js"></script>
    <div id="root"></div>
    <script type="text/babel">
      /*JSX语法规则
       *1定义虚拟DOM时不要写引号
       *2.标签中混入JS表达式要用{}
       * 3.样式的类名不要用class要用className
       * 4.只允许一个根节点
       * 5.内敛样式，要用style={{key:value}}的形式去写
       * 6.标签必须闭合
       * 7.标签首字母
       */
      let item = (
        <>
          <div className="item">
            <h3>内容</h3>
            <input type="text" placeholder="买鱼吗？" />
          </div>
        </>
      )

      // 创建根节点
      let root = ReactDOM.createRoot(document.getElementById('root'))

      root.render(item)
    </script>
  </head>
  <body></body>
</html>
